<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>


<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
        <span aria-hidden="true">&times;</span></button>
    <h4 class="modal-title">企业评价</h4>
</div>
<div class="modal-body">
    <form id="form_data" class=" row ">
        <div id="div_error"></div>
        <input type="hidden" name="businessId" value="${businessId}">

        <div class="form-group col-sm-10 col-sm-offset-1">
            <label>1、评审人员是否有收受礼品或现金情况，如有，请注明名称、数量、价值：</label>
            <div>
                <div class="col-sm-2 ">
                    <div class="radio">
                        <label>
                            <input type="radio" name="bribery" checked value="0"/>无
                        </label>
                    </div>
                    <div class="radio">
                        <label>
                            <input type="radio" name="bribery" value="1"/>有
                        </label>
                    </div>
                </div>
                <div class="col-sm-10 ">
                    <div class="radio">
                        <textarea class="form-control " rows="4" name="briberyRemark"></textarea>
                    </div>
                </div>
            </div>
        </div>


        <div class="form-group col-sm-10 col-sm-offset-1">
            <label>2、评审人员是否有向申请单位提出解决个人或单位利益问题的情况，如有，请详细描述：</label>
            <div>
                <div class="col-sm-2 ">
                    <div class="radio">
                        <label>
                            <input type="radio" name="privateThing" checked  value="0"/>无
                        </label>
                    </div>
                    <div class="radio">
                        <label>
                            <input type="radio" name="privateThing" value="1"/>有
                        </label>
                    </div>
                </div>
                <div class="col-sm-10 ">

                    <div class="radio">
                        <textarea class="form-control " rows="4" name="privateThingRemark"></textarea>
                    </div>
                </div>
            </div>
        </div>


        <div class="form-group col-sm-10 col-sm-offset-1">
            <label>3、评审人员是否有人参加过<b>有偿</b>咨询活动，如有，请详细描述：</label>
            <div>
                <div class="col-sm-2">
                    <div class="radio">
                        <label>
                            <input type="radio" name="consultation" checked  value="0"/>无
                        </label>
                    </div>
                    <div class="radio">
                        <label>
                            <input type="radio" name="consultation" value="1"/>有
                        </label>
                    </div>
                </div>
                <div class="col-sm-10 ">
                    <div class="radio">
                        <textarea class="form-control input-sm" rows="4" name="consultationRemark"></textarea>
                    </div>
                </div>
            </div>
        </div>


        <div class="form-group col-sm-10 col-sm-offset-1">
            <label>4、评审人员在工作作风和秉公审查方面存在的问题：</label>
            <div>
                <div class="col-sm-2">
                    <div class="radio">
                        <label>
                            <input type="radio" name="style" checked  value="0"/>无
                        </label>
                    </div>
                    <div class="radio">
                        <label>
                            <input type="radio" name="style" value="1"/>有
                        </label>
                    </div>
                </div>
                <div class="col-sm-10">
                    <div class="radio">
                        <textarea class="form-control input-sm" rows="4" name="styleRemark"></textarea>
                    </div>
                </div>
            </div>
        </div>


        <div class="form-group col-sm-10 col-sm-offset-1">
            <label>5、其他建议或反馈：</label>
            <textarea class="form-control input-sm" name="remark" rows="4"></textarea>
        </div>

        <div class="form-group col-sm-10 col-sm-offset-1">
            <div class="col-sm-offset-5">
                <button type="submit"
                        class="btn btn-default btn-success"><span
                        class="glyphicon glyphicon-ok"></span>&nbsp;确&nbsp;定&nbsp;
                </button>
            </div>
        </div>

    </form>

</div>


<script>

    $form_date = $("#form_data");
    $('#form_data input[type="radio"]').click(function () {
        var str = $(this).attr('name') + 'Remark';
        if ($(this).val() == '1') {
            $form_date.data('bootstrapValidator').removeField(str).addField(str, {
                validators: {
                    notEmpty: {
                        message: '不能为空！请详细描述。'
                    }
                }
            }).validateField(str);
        } else {
            $form_date.data('bootstrapValidator').removeField(str).addField(str, {
                validators: {}
            }).validateField(str);
        }
    });


    $form_date.bootstrapValidator({
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {}
    }).on('success.form.bv', function (e) {
        e.preventDefault();
        $.sysPlugin.superAjax({
            data: $(e.target).serialize(),
            url: '${url}',
            operateType: '${operateType}',
            showSuccessAlert: true,
            showWarnAlert: false,
            successCall: function (data) {
                $.sysPlugin.successCallBack(data, {
                    modal: $("#modal_ajax"),
                    table: $("#table_data")
                })
            },
            errorCall: function (data) {
                $.sysPlugin.errorCallBack(data, {
                    form: $form_date
                })
            }
        });
    });
</script>



